﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BestLifePOS_Core.Data.Commands;
using BestLifePOS_Core.DomainObjects;
using System.Data;

namespace BestLifePOS_Core.Data.Fascade
{
   public class Purchase_OrderDAO
    {


        public static List<Purchase_Order> GetAllPos()
        {
            BestLifeGetAllApprovedPosDataAction LvGet = new BestLifeGetAllApprovedPosDataAction();
            return LvGet.execute();
        }

        public static List<Purchase_Order> GetPoByVId(string PVId)
        {
            BestLifePosByVendorIDDataAction LvGet = new BestLifePosByVendorIDDataAction(PVId);
            return LvGet.execute();
        }

        public static DataTable GetPoDetailsByPoId(string POId)
        {
            BestLifePoDetailsByPoIdDataAction LvGet = new BestLifePoDetailsByPoIdDataAction(POId);
            return LvGet.execute();
        }

        public static List<Purchase_Order> GetApprovedPoDetailsByPoId(string POId)
        {
            BestLifeGetApprovedPoDetailsByPoIdDataAction LvGet = new BestLifeGetApprovedPoDetailsByPoIdDataAction(POId);
            return LvGet.execute();
        }

        public static string GetNewPOId()
        {
            BestLifeGetNewPOIdDataAction LvGet = new BestLifeGetNewPOIdDataAction();
            return LvGet.execute();
        }

        public static int SavePO(Purchase_Order PPO, string Pxml, List<string> PList)
        {
            BestLifeSaveNewPODataAction LvIns = new BestLifeSaveNewPODataAction(PPO, Pxml, PList);
            return LvIns.execute();
        }

        public static List<Purchase_Order> GetAllApprovedPO()
        {
            BestLifeGetAllApprovedPODataAction LvGet = new BestLifeGetAllApprovedPODataAction();
            return LvGet.execute();
        }
        public static List<Purchase_Order> GetAllPObyStatus(string PStatus)
        {
            BestLifePurchaseOrderMasDetailsByStatus LvPO = new BestLifePurchaseOrderMasDetailsByStatus(PStatus);
           return LvPO.execute();

        }
        public static int UpdatePO(string PPLList, string PStatus)
        {
            BestLifeUpdatePurchaseOrderDataAction LvPO = new BestLifeUpdatePurchaseOrderDataAction(PPLList, PStatus);
           return LvPO.execute();
        }

        public static DataTable GetPoinDetailsByPoId(string POId,string PStatus)
        {
            BestLifePOinDetailByStatusDataAction LvPOID = new BestLifePOinDetailByStatusDataAction(POId,PStatus);
            return LvPOID.execute();
        }

      

       


    }
}
